package com.mooc.meetingfilm.utils.common.vo;

import com.mooc.meetingfilm.utils.exception.BaseServiceException;
import lombok.Data;
import org.springframework.util.StringUtils;

@Data
public class LoginParamVO extends BaseRequestParamVO{
    private String username;
    private String password;

    @Override
    public void check() throws BaseServiceException {
        if (StringUtils.isEmpty(username)){
            throw new BaseServiceException(404, "用户名不能为空");
        }
        if (StringUtils.isEmpty(password)){
            throw new BaseServiceException(404, "密码不能为空");
        }
    }
}
